<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<c:set var="module" value="tag"/>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/tag/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
                 <label class="col-sm-2 control-label">标签名称</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="name" value="${n.name }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">状态</label>
                 <div class="col-sm-10">
                 	<%-- <input type="text" class="form-control" name="status" value="${n.status }"> --%>
					<select name="status" class="form-control">
						<option value="">请选择标签状态</option>
						<c:forEach items="${tss }" var="ts">
							<option value="${ts.value }"
								<c:if test="${ts.value eq n.status }">selected="selected"</c:if>>${ts.remark }</option>
						</c:forEach>
					</select>
				</div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">编码</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="code" value="${n.code }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">父标签</label>
                 <div class="col-sm-10">
                 	<input type="hidden" placeholder="父标签" id="parentTag-id" name="parentTag.id" value="${n.parentTag.id }" class="form-control">
                 	<input type="text" class="form-control" id="parentTag-name" name="parentTag.name" value="${n.parentTag.name }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/tag/list',
						                 	name: 'name',
						                 	idInput: 'parentTag-id',
						                 	nameInput: 'parentTag-name'
						                 	})" />
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">图片</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" readonly id="image" name="image" value="${n.image }"
                 		onclick="bring4webuploader({idInput: 'image'})"/>
                 		<img src="" width="100"/>
                 </div>
             </div>	
        	
		</form>
</div>

<%@include file="/common/foot.jsp" %>

</body>
</html>
